<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('出库口回流口监控')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <!--    <link rel="stylesheet" type="text/css" href="/css/bootstrap-switch.min.css">-->
</head>
<body class="gray-bg">
<div class="ui-layout-center">
    <div class="container-div">
        <div class="row col-sm-12" style="height: 50%;width: 49%">
            <div id="div" style="height: 26%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table"></table>
            </div>
            <div id="div11" style="height: 74%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table11"></table>
            </div>
        </div>
        <div class="row col-sm-12" style="height: 50%;width: 49%">
            <div id="div1" style="height: 26%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table1"></table>
            </div>
            <div id="div12" style="height: 74%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table12"></table>
            </div>
        </div>
        <div class="row col-sm-12" style="height: 50%;width: 49%">
            <div id="div2" style="height: 26%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table2"></table>
            </div>
            <div id="div13" style="height: 74%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table13"></table>
            </div>
        </div>
        <div class="row col-sm-12" style="height: 50%;width: 49%">
            <div id="div3" style="height: 26%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table3"></table>
            </div>
            <div id="div14" style="height: 74%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table14"></table>
            </div>
        </div>
        <div class="row col-sm-12" style="height: 50%;width: 49%">
            <div id="div4" style="height: 26%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table4"></table>
            </div>
            <div id="div15" style="height: 74%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table15"></table>
            </div>
        </div>
        <div class="row col-sm-12" style="height: 50%;width: 49%">
            <div id="div5" style="height: 26%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table5"></table>
            </div>
            <div id="div16" style="height: 74%;width: 100%" class="col-sm-5 select-table">
                <table id="bootstrap-table16"></table>
            </div>
        </div>
    </div>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<!--<script src="/js/bootstrap-switch.min.js" type="text/javascript"></script>-->

<script th:inline="javascript">

    var prefix = ctx + "deviceInfo";
    var errDatas = [[${@dict.getType('tsj_err_msg')}]];
    //页面加载完成后执行
    $(function () {
        var panehHidden = false;
        if ($(this).width() < 769) {
            panehHidden = true;
        }
        $('body').layout({initClosed: panehHidden, west__size: 85});
        // 回到顶部绑定
        if ($.fn.toTop !== undefined) {
            var opt = {
                win: $('.ui-layout-center'),
                doc: $('.ui-layout-center')
            };
            $('#scroll-up').toTop(opt);
        }
        queryUserList();
        queryUserList11();
        queryUserList1();
        queryUserList12();
        queryUserList2();
        queryUserList13();
        queryUserList3();
        queryUserList14();
        queryUserList4();
        queryUserList15();
        queryUserList5();
        queryUserList16();
        reloadTable();
    });

    function reloadTable() {

        $('#bootstrap-table').bootstrapTable('refresh');
        $('#bootstrap-table1').bootstrapTable('refresh');
        $('#bootstrap-table2').bootstrapTable('refresh');
        $('#bootstrap-table3').bootstrapTable('refresh');
        $('#bootstrap-table4').bootstrapTable('refresh');
        $('#bootstrap-table5').bootstrapTable('refresh');
        setTimeout(reloadTable, 3 * 1000);
    }

    function queryUserList() {

        var options = {
            url: prefix + "/listtsj",
            height: $("#div").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'name',
                    title: '设备名称 '
                },
                {
                    field: 'rwh',
                    title: '任务号',
                    sortable: true
                },{
                    field: 'jdbz',
                    title: '阶段标志',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未开始";
                        } else if (value == 1) {
                            return "取货途中";
                        } else if (value == 2) {
                            return "取货";
                        } else if (value == 3) {
                            return "放货途中";
                        } else if (value == 4) {
                            return "放货";
                        } else if (value == 5) {
                            return "完成";
                        }
                    }
                },{
                    field: 'sbzt',
                    title: '设备状态',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(errDatas, value);
                    }
                },
                {
                    field: 'yxxf',
                    title: '允许下发',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不允许";
                        } else if (value == 1) {
                            return "允许";
                        }
                    }
                },
                {
                    field: 'yc',
                    title: '源层',
                    sortable: true
                },
                {
                    field: 'mbc',
                    title: '目标层',
                    sortable: true
                }
            ]
        };
        $('#bootstrap-table').bootstrapTable(options)
    }
    function queryUserList11() {

        var options11 = {
            url: prefix + "/listssj",
            height: $("#div11").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'devName',
                    title: '设备名字 '
                },
                {
                    field: 'taskNo',
                    title: '任务号',
                    sortable: true
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table11').bootstrapTable(options11)
    }
    function queryUserList1() {

        var options1 = {
            url: prefix + "/listtsj1",
            height: $("#div1").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'name',
                    title: '设备名称 '
                },
                {
                    field: 'rwh',
                    title: '任务号',
                    sortable: true
                },{
                    field: 'jdbz',
                    title: '阶段标志',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未开始";
                        } else if (value == 1) {
                            return "取货途中";
                        } else if (value == 2) {
                            return "取货";
                        } else if (value == 3) {
                            return "放货途中";
                        } else if (value == 4) {
                            return "放货";
                        } else if (value == 5) {
                            return "完成";
                        }
                    }
                },{
                    field: 'sbzt',
                    title: '设备状态',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(errDatas, value);
                    }
                },
                {
                    field: 'yxxf',
                    title: '允许下发',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不允许";
                        } else if (value == 1) {
                            return "允许";
                        }
                    }
                },
                {
                    field: 'yc',
                    title: '源层',
                    sortable: true
                },
                {
                    field: 'mbc',
                    title: '目标层',
                    sortable: true
                }
            ]
        };
        $('#bootstrap-table1').bootstrapTable(options1)
    }
    function queryUserList12() {

        var options12 = {
            url: prefix + "/listssj12",
            height: $("#div12").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'devName',
                    title: '设备名字 '
                },
                {
                    field: 'taskNo',
                    title: '任务号',
                    sortable: true
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table12').bootstrapTable(options12)
    }
    function queryUserList2() {

        var options2 = {
            url: prefix + "/listtsj2",
            height: $("#div2").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'name',
                    title: '设备名称 '
                },
                {
                    field: 'rwh',
                    title: '任务号',
                    sortable: true
                },{
                    field: 'jdbz',
                    title: '阶段标志',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未开始";
                        } else if (value == 1) {
                            return "取货途中";
                        } else if (value == 2) {
                            return "取货";
                        } else if (value == 3) {
                            return "放货途中";
                        } else if (value == 4) {
                            return "放货";
                        } else if (value == 5) {
                            return "完成";
                        }
                    }
                },{
                    field: 'sbzt',
                    title: '设备状态',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(errDatas, value);
                    }
                },
                {
                    field: 'yxxf',
                    title: '允许下发',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不允许";
                        } else if (value == 1) {
                            return "允许";
                        }
                    }
                },
                {
                    field: 'yc',
                    title: '源层',
                    sortable: true
                },
                {
                    field: 'mbc',
                    title: '目标层',
                    sortable: true
                }
            ]
        };
        $('#bootstrap-table2').bootstrapTable(options2)
    }
    function queryUserList13() {

        var options13 = {
            url: prefix + "/listssj13",
            height: $("#div13").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'devName',
                    title: '设备名字 ',
                },
                {
                    field: 'taskNo',
                    title: '任务号',
                    sortable: true
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table13').bootstrapTable(options13)
    }
    function queryUserList3() {

        var options3 = {
            url: prefix + "/listtsj3",
            height: $("#div3").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'name',
                    title: '设备名称 '
                },
                {
                    field: 'rwh',
                    title: '任务号',
                    sortable: true
                },{
                    field: 'jdbz',
                    title: '阶段标志',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未开始";
                        } else if (value == 1) {
                            return "取货途中";
                        } else if (value == 2) {
                            return "取货";
                        } else if (value == 3) {
                            return "放货途中";
                        } else if (value == 4) {
                            return "放货";
                        } else if (value == 5) {
                            return "完成";
                        }
                    }
                },{
                    field: 'sbzt',
                    title: '设备状态',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(errDatas, value);
                    }
                },
                {
                    field: 'yxxf',
                    title: '允许下发',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不允许";
                        } else if (value == 1) {
                            return "允许";
                        }
                    }
                },
                {
                    field: 'yc',
                    title: '源层',
                    sortable: true
                },
                {
                    field: 'mbc',
                    title: '目标层',
                    sortable: true
                }
            ]
        };
        $('#bootstrap-table3').bootstrapTable(options3)
    }
    function queryUserList14() {

        var options14 = {
            url: prefix + "/listssj14",
            height: $("#div14").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'devName',
                    title: '设备名字 ',
                },
                {
                    field: 'taskNo',
                    title: '任务号',
                    sortable: true
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table14').bootstrapTable(options14)
    }
    function queryUserList4() {

        var options4 = {
            url: prefix + "/listtsj4",
            height: $("#div4").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'name',
                    title: '设备名称 '
                },
                {
                    field: 'rwh',
                    title: '任务号',
                    sortable: true
                },{
                    field: 'jdbz',
                    title: '阶段标志',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未开始";
                        } else if (value == 1) {
                            return "取货途中";
                        } else if (value == 2) {
                            return "取货";
                        } else if (value == 3) {
                            return "放货途中";
                        } else if (value == 4) {
                            return "放货";
                        } else if (value == 5) {
                            return "完成";
                        }
                    }
                },{
                    field: 'sbzt',
                    title: '设备状态',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(errDatas, value);
                    }
                },
                {
                    field: 'yxxf',
                    title: '允许下发',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不允许";
                        } else if (value == 1) {
                            return "允许";
                        }
                    }
                },
                {
                    field: 'yc',
                    title: '源层',
                    sortable: true
                },
                {
                    field: 'mbc',
                    title: '目标层',
                    sortable: true
                }
            ]
        };
        $('#bootstrap-table4').bootstrapTable(options4)
    }
    function queryUserList15() {

        var options15 = {
            url: prefix + "/listssj15",
            height: $("#div15").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'devName',
                    title: '设备名字 ',
                },
                {
                    field: 'taskNo',
                    title: '任务号',
                    sortable: true
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table15').bootstrapTable(options15)
    }
    function queryUserList5() {
        var options5 = {
            url: prefix + "/listtsj5",
            height: $("#div5").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'name',
                    title: '设备名称 '
                },
                {
                    field: 'rwh',
                    title: '任务号',
                    sortable: true
                },{
                    field: 'jdbz',
                    title: '阶段标志',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未开始";
                        } else if (value == 1) {
                            return "取货途中";
                        } else if (value == 2) {
                            return "取货";
                        } else if (value == 3) {
                            return "放货途中";
                        } else if (value == 4) {
                            return "放货";
                        } else if (value == 5) {
                            return "完成";
                        }
                    }
                },{
                    field: 'sbzt',
                    title: '设备状态',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(errDatas, value);
                    }
                },
                {
                    field: 'yxxf',
                    title: '允许下发',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不允许";
                        } else if (value == 1) {
                            return "允许";
                        }
                    }
                },
                {
                    field: 'yc',
                    title: '源层',
                    sortable: true
                },
                {
                    field: 'mbc',
                    title: '目标层',
                    sortable: true
                }
            ]
        };
        $('#bootstrap-table5').bootstrapTable(options5)
    }
    function queryUserList16() {

        var options16 = {
            url: prefix + "/listssj16",
            height: $("#div16").height() / 1,
            sortName: "id", //排序字段
            sortOrder: "asc",   //排序规则
            modalName: "输送机",
            columns: [
                {
                    field: 'devName',
                    title: '设备名字 ',
                },
                {
                    field: 'taskNo',
                    title: '任务号',
                    sortable: true
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table16').bootstrapTable(options16)
    }




</script>
</body>
</html>
